home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 4 / Meeting Pearls Vol. IV (1996)(GTI - Schatztruhe)[!].iso / Contrib / FindPearls / s / CopyToHD next >
AmigaDOS Script File  |  1996-10-20  |  6KB  |  174 lines

  1. .key FROMMP/A,FROM/A,TO/A,MPUSEMETATOOL/S,USEMETATOOL/S,COPYDRAWERANDICON/S,LANGUAGE
  2. .bra {
  3. .ket }
  4.  
  5. ; FROMMP= From which Meeting Pearls CD to copy from
  6. ; FROM= complete path of the directory to copy from
  7. ; TO= complete path to which directory to copy to
  8. ; MPUSEMETATOOL= Wish to use MetaTool even when started from HD
  9. ; USEMETATOOL= Wish to use MetaTool even when started from HD 
  10. ; (identical for reason of history)
  11. ; COPYDRAWERANDICON= Wish to create a new destination drawer, and copy
  12. ; the icon as well
  13. ; LANGUAGE= german|english text for output.
  14.  
  15. IF NOT EXISTS "{FROMMP}:{FROM}"
  16.     IF {LANGUAGE} EQ "deutsch"
  17.         C/AutoReq "-tInterner Fehler:" "-tVerzeichnis »{FROMMP}:{FROM}«" "-texistiert nicht." -nOK
  18.     ELSE
  19.         C/AutoReq "-tInternal error:" "-tDrawer »{FROMMP}:{FROM}«" "-tdoes not exist." -nOK
  20.     ENDIF
  21.     QUIT 20
  22. ENDIF
  23.  
  24.  
  25. FailAt 25
  26.  
  27. Assign FPTMPCOPYDIR{$$}: ":"
  28.  
  29. IF {LANGUAGE} EQ "deutsch"
  30.     FPTMPCOPYDIR{$$}:C/WaitingReq ON "MPWAITINGREQ{$$}" "*nKopier-Operation wird gestartet*nQuelle: {FROMMP}:{FROM}*nZiel: {TO}*n*n" CON:40/30/550/140/INFO
  31. ELSE
  32.     FPTMPCOPYDIR{$$}:C/WaitingReq ON "MPWAITINGREQ{$$}" "*nCopy command in process*nSource: {FROMMP}:{FROM}*nDestination: {TO}*n*n" CON:40/30/550/140/INFO
  33. ENDIF
  34.  
  35. IF "{MPUSEMETATOOL}" EQ "MPUSEMETATOOL"
  36.     Skip UseMetaTool
  37. ENDIF
  38.  
  39. IF "{USEMETATOOL}" EQ "USEMETATOOL"
  40.     Skip UseMetaTool
  41. ENDIF
  42.  
  43. Skip NoMetaTool
  44.  
  45. LAB UseMetaTool
  46. IF NOT EXISTS ENV:METACONFIG
  47.     FPTMPCOPYDIR{$$}:C/Version >NIL: 37
  48.     IF WARN
  49.         Copy FPTMPCOPYDIR{$$}:S/MetaTool33.config-HD S:
  50.         SetEnv METACONFIG S:MetaTool33.config-HD
  51.         IF {LANGUAGE} EQ "deutsch"
  52.             FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Bitte passen Sie die Datei S:MetaTool33.config-HD an Ihr System an.*n*n"
  53.         ELSE
  54.             FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Please edit the file S:MetaTool33.config-HD to fit in your system.*n*n"
  55.         ENDIF
  56.         IF EXISTS ENV:EDITOR
  57.             "$EDITOR" S:MetaTool33.config-HD
  58.         ENDIF
  59.     ELSE
  60.         FPTMPCOPYDIR{$$}:C/Version >NIL: 39
  61.         IF WARN
  62.             Copy FPTMPCOPYDIR{$$}:S/MetaTool37.config-HD S:
  63.             SetEnv METACONFIG S:MetaTool37.config-HD
  64.             IF {LANGUAGE} EQ "deutsch"
  65.                 FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Bitte passen Sie die Datei S:MetaTool37.config-HD an Ihr System an.*n*n"
  66.             ELSE
  67.                 FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Please edit the file S:MetaTool37.config-HD to fit in your system.*n*n"
  68.             ENDIF
  69.             IF EXISTS ENV:EDITOR
  70.                 "$EDITOR" S:MetaTool37.config-HD
  71.             ENDIF
  72.         ELSE
  73.             Copy FPTMPCOPYDIR{$$}:S/MetaTool39.config-HD S:
  74.             SetEnv METACONFIG S:MetaTool39.config-HD
  75.             IF {LANGUAGE} EQ "deutsch"
  76.                 FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Bitte passen Sie die Datei S:MetaTool39.config-HD an Ihr System an.*n*n"
  77.             ELSE
  78.                 FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Please edit the file S:MetaTool39.config-HD to fit in your system.*n*n"
  79.             ENDIF
  80.             IF EXISTS ENV:EDITOR
  81.                 "$EDITOR" S:MetaTool39.config-HD
  82.             ENDIF
  83.         ENDIF
  84.     ENDIF
  85.     Copy ENV:METACONFIG ENVARC:
  86. ENDIF
  87.  
  88. LAB NoMetaTool
  89.  
  90. Assign MPTMPCOPYDIR{$$}: "{FROMMP}:"
  91. IF "{COPYDRAWERANDICON}" EQ "COPYDRAWERANDICON"
  92.     Copy FROM "MPTMPCOPYDIR{$$}:{FROM}(%|.info)" TO "{TO}" ALL QUIET CLONE
  93.     FPTMPCOPYDIR{$$}:C/MPGetDestPath >ENV:MPNEWPATH "{FROMMP}:{FROM}" "{TO}"
  94.     FPTMPCOPYDIR{$$}:C/icontools unsnapshot "$MPNEWPATH.info"
  95.     CD "$MPNEWPATH"
  96.     Delete ENV:MPNEWPATH QUIET
  97. ELSE
  98.     Copy FROM "MPTMPCOPYDIR{$$}:{FROM}" TO "{TO}" ALL QUIET CLONE
  99.     FPTMPCOPYDIR{$$}:C/icontools unsnapshot "{TO}.info"
  100.     CD "{TO}"
  101. ENDIF
  102.  
  103. IF {LANGUAGE} EQ "deutsch"
  104.     FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Attribute und Kommentare werden angepaßt*n*n"
  105. ELSE
  106.     FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Restoring protection flags and file comments*n*n"
  107. ENDIF
  108.  
  109. List >ENV:MPTMPSADVAR{$$} FPTMPCOPYDIR{$$}:C/Test LFORMAT "%a%c"
  110. IF $MPTMPSADVAR{$$} EQ "-sp-r--dTest-Kommentar"
  111.     IF {LANGUAGE} EQ "deutsch"
  112.         FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "=> Oops, das ist auf ihrem System gar nicht nötig!*n   Sie benutzen wohl ein CD-ROM Dateisystem, das Amiga-Protectionbits unterstützt.*n*n"
  113.     ELSE
  114.         FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "=> Oops, this is not necessary on your system!*n   You probably use a CD-ROM filesystem, that supports Amiga protection bits.*n*n"
  115.     ENDIF
  116. ELSE
  117.     Resident FPTMPCOPYDIR{$$}:C/SetComment PURE ADD
  118.     Resident FPTMPCOPYDIR{$$}:C/SetProtection PURE ADD
  119.     Execute "MPTMPCOPYDIR{$$}:SetAttributesDir/{FROM}/SetAttributes" "MPTMPCOPYDIR{$$}:SetAttributesDir/{FROM}"
  120.     Resident SetComment REMOVE
  121.     Resident SetProtection REMOVE
  122. ENDIF
  123. Delete ENV:MPTMPSADVAR{$$} QUIET
  124.  
  125. IF {LANGUAGE} EQ "deutsch"
  126.     FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Default-Tools werden angepaßt*n*n"
  127. ELSE
  128.     FPTMPCOPYDIR{$$}:C/WaitingReq UPDATE "MPWAITINGREQ{$$}" "Restoring default tools*n*n"
  129. ENDIF
  130.  
  131. Echo  >RAM:CPTOHDIT{$$} "TEXT"
  132. Echo >>RAM:CPTOHDIT{$$} "$FPMTTEXT"
  133. Echo >>RAM:CPTOHDIT{$$} "GUIDE"
  134. Echo >>RAM:CPTOHDIT{$$} "$FPMTGUIDE"
  135. Echo >>RAM:CPTOHDIT{$$} "INST"
  136. Echo >>RAM:CPTOHDIT{$$} "$FPMTINST"
  137. Echo >>RAM:CPTOHDIT{$$} "ICONX"
  138. Echo >>RAM:CPTOHDIT{$$} "$FPMTICONX"
  139. Echo >>RAM:CPTOHDIT{$$} "HTML"
  140. Echo >>RAM:CPTOHDIT{$$} "$FPMTHTML"
  141. Echo >>RAM:CPTOHDIT{$$} "BIN"
  142. Echo >>RAM:CPTOHDIT{$$} "$FPMTBIN"
  143. Echo >>RAM:CPTOHDIT{$$} "REXX"
  144. Echo >>RAM:CPTOHDIT{$$} "$FPMTREXX"
  145. Echo >>RAM:CPTOHDIT{$$} "PS"
  146. Echo >>RAM:CPTOHDIT{$$} "$FPMTPS"
  147. Echo >>RAM:CPTOHDIT{$$} "8SVX"
  148. Echo >>RAM:CPTOHDIT{$$} "$FPMT8SVX"
  149. Echo >>RAM:CPTOHDIT{$$} "JPEG"
  150. Echo >>RAM:CPTOHDIT{$$} "$FPMTJPEG"
  151. Echo >>RAM:CPTOHDIT{$$} "GIF"
  152. Echo >>RAM:CPTOHDIT{$$} "$FPMTGIF"
  153. Echo >>RAM:CPTOHDIT{$$} "ILBM"
  154. Echo >>RAM:CPTOHDIT{$$} "$FPMTILBM"
  155. Echo >>RAM:CPTOHDIT{$$} "MOVIE"
  156. Echo >>RAM:CPTOHDIT{$$} "$FPMTMOVIE"
  157. Echo >>RAM:CPTOHDIT{$$} "ANIM"
  158. Echo >>RAM:CPTOHDIT{$$} "$FPMTANIM"
  159. Echo >>RAM:CPTOHDIT{$$} "DVI"
  160. Echo >>RAM:CPTOHDIT{$$} "$FPMTDVI"
  161. Echo >>RAM:CPTOHDIT{$$} "TEX"
  162. Echo >>RAM:CPTOHDIT{$$} "$FPMTTEX"
  163. Echo >>RAM:CPTOHDIT{$$} "SOURCE"
  164. Echo >>RAM:CPTOHDIT{$$} "$FPMTSOURCE"
  165.  
  166. FPTMPCOPYDIR{$$}:C/icontools replace_mp_file "" RAM:CPTOHDIT{$$} recursive
  167.  
  168. FPTMPCOPYDIR{$$}:C/WaitingReq OFF "MPWAITINGREQ{$$}"
  169. Delete QUIET RAM:CPTOHDIT{$$}
  170.  
  171. CD MPTMPCOPYDIR{$$}:
  172. Assign MPTMPCOPYDIR{$$}:
  173.  
  174.